<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>exa3_4</title>
</head>
<body>
<%
    //request.setCharacterEncoding("utf-8");
    String username=request.getParameter("user");
    if(username==null){ username=""; }
    if(username.equals("")){
        response.sendRedirect("exa3_3.html");
    }else{
%>
<br/>欢迎<%=username%>进入音乐前沿网站！<br/>
    <% String singers[] = request.getParameterValues("singers") ;%>
    <%if (singers!=null){%>
    <h2>您喜爱的歌手有：
      <% for(int i = 0;i < singers.length;i++){  %>
        <span style="color: red"><%=singers[i]%> &nbsp;&nbsp;</span>
      <% }  //end for %>
     </h2>
    <%
      } //end if singers!=null
    String city=request.getParameter("area");
    %>
<h2>您的家庭所在地：<%=city%></h2>
<% }//end if has username %>
</body>
</html>
